home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / wordsm10.zip / WORDSMRT.BAT < prev    next >
DOS Batch File  |  1992-12-21  |  2KB  |  62 lines

  1. @echo off
  2.  
  3. :: To use this batch file, type the INPUT file name as the first
  4. :: parameter, and next the name of the OUTPUT file. Note 
  5. :: that the batch file supplies the "-W" parameter automatically. If 
  6. :: you are using the UNregistered version of WordSmart, the "-Q" 
  7. :: switch used in the command line below will not have any effect. 
  8. :: (See the documentation for more information about the WordSmart 
  9. :: commands that are supported in the registered version.)
  10.  
  11. if "%1" == "" goto NOPARM
  12.  
  13. WSM %1 -w %2 -q   %3 %4 %5 %6 %7 %8 %9
  14.  
  15. echo.
  16.  
  17. if errorlevel 5 goto read_only
  18. if errorlevel 4 goto targeterr
  19. if errorlevel 3 goto exist  
  20. if errorlevel 2 goto cantoverwrite
  21. if errorlevel 1 goto readerr
  22.  
  23. echo.
  24. echo ---------- WordSmart: Processing was successful ---------- 
  25. goto end
  26. :read_only
  27. echo.
  28. echo ---------- WordSmart: The output file (%2) is Read only! ---------- 
  29. goto end
  30. :targeterr 
  31. echo.
  32. echo ---------- WordSmart: Can't write the output file (%2)! ---------- 
  33. goto end
  34.  
  35. :cantoverwrite
  36. echo.
  37. echo ---------- WordSmart: Cannot overwrite itself! ---------- 
  38. goto end
  39.  
  40. :exist
  41. echo.
  42. echo ---------- WordSmart: Output file exists! (use '-O' to over-write) ---------- 
  43. goto end
  44.  
  45. :readerr
  46. echo.
  47. echo ---------- WordSmart: Can't find specified input file (%1)! ---------- 
  48. goto end
  49.  
  50. :noparm
  51. echo.
  52. echo This batch file requires some parameters on the command line.
  53. echo Read the text at the start of the batch file itself for
  54. echo more information.
  55. echo.
  56. pause
  57. cls
  58. WSM
  59.  
  60. :end
  61.  
  62.